package com.lp.service.function;

import java.util.UUID;

import com.lp.business.function.BaseBusinessUtil;

/**
 * 业务工具方法
 * 
 * @author lipeng
 * 
 */
public class BusinessUtil extends BaseBusinessUtil {
	/**
	 * 根据房源所在楼层和总楼层计算楼层类型<br/>
	 * 
	 * @param houseFloor 房源所在楼层
	 * @param houseFloorTotal 房源总楼层
	 * @return String 楼层类型
	 */
	public static String getHouseFloorType(int currFloor,int floors) {
		try{
			if(currFloor>0&&floors>0){
				if(currFloor*1.0/floors<=1.0/3){
					return "低层";
				}else if(currFloor*1.0/floors<=2.0/3){
					return "中层";
				}else{
					return "高层";
				}
			}
			
		}catch(Exception e){
			return null;
		}
		return null;
	}

	public static String getToken() {
		return UUID.randomUUID().toString().replace("-", "");
	}
	
}
